BLeak: Automatically Debugging Memory Leaks in Web Applications

نویسندگان

  • John Vilk
  • Emery D. Berger
چکیده

Despite the presence of garbage collection in managed languages like JavaScript, memory leaks remain a serious problem. In the context of web applications, these leaks are especially pervasive and di cult to debug. Web application memory leaks can take many forms, including failing to dispose of unneeded event listeners, repeatedly injecting iframes and CSS les, and failing to call cleanup routines in thirdparty libraries. Leaks degrade responsiveness by increasing GC frequency and overhead, and can even lead to browser tab crashes by exhausting available memory. Because previous leak detection approaches designed for conventional C, C++ or Java applications are ine ective in the browser environment, tracking down leaks currently requires intensive manual e ort by web developers. This paper introduces BLeak (Browser Leak debugger), the rst system for automatically debuggingmemory leaks in web applications. BLeak’s algorithms leverage the observation that in modern web applications, users often repeatedly return to the same (approximate) visual state (e.g., the inbox view in Gmail). Sustained growth between round trips is a strong indicator of a memory leak. To use BLeak, a developer writes a short script (≈40 LOC) to drive a web application in round trips to the same visual state. BLeak then automatically generates a list of leaks found along with their root causes, ranked by severity. Guided by BLeak, we identify and x over 50 memory leaks in popular libraries and apps including Airbnb, AngularJS, Google Analytics, Google Maps SDK, and jQuery. BLeak’s median precision is 100%; xing the leaks it identi es reduces heap growth by an average of 94%, saving from 0.5 MB to 8 MB per round trip.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Detection and Diagnosis of Memory Leaks in Web Applications

Memory leaks – the existence of unused memory on the heap of applications – result in low performance and may, in the worst case, cause applications to crash. The migration of application logic to the client side of modern web applications and the use of JavaScript as the main language for client-side development have made memory leaks in JavaScript an issue for web applications. Significant po...

متن کامل

Plug: Automatically Tolerating Memory Leaks in C and C++ Applications

Memory leaks remain a significant challenge for C and C++ developers. Leaky applications become slower over time as their working set grows, triggering paging, and can eventually become unresponsive. At the same time, memory leaks remain notoriously difficult to debug, and comprise a large number of reported bugs in mature applications. Existing approaches like conservative garbage collection c...

متن کامل

Memory Debugging in Parallel and Distributed Applications

Memory bugs, essentially a mistake in the management of heap memory, can occur in any program that is being written, enhanced, or maintained. A memory bug can be caused by a number of factors, including failure to check for error conditions; relying on nonstandard behavior; memory leaks including failure to free memory; dangling references such as failure to clear pointers; array bounds violati...

متن کامل

Bug Hunting in Sensor Network Applications

Testing sensor network applications is an essential and a difficult task. Due to their distributed and faulty nature, severe resource constraints, unobservable interactions, and limited human interaction, sensor networks, make monitoring and debugging of applications strenuous and more challenging. In this paper we present KleeNet — a Klee based platform independent bug hunting tool for sensor ...

متن کامل

Memory leak detection embedded systems pdf

marxism after marx pdf class="text">Has led to the development of a number of debugging tools to detect unreachable memory. Create a book Download as PDF Printable version.Memory leak detection using Electric fence and Valgrind. An operating system that does not release the memory consumed by the application when the.Memory leak is a major resource issue which could lead to many system. 2 Cal E...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017